package com.example.cafe.work.util;

import com.example.cafe.work.dto.UserSenstive;

public class UserHolder {
    private static final ThreadLocal<UserSenstive> tl = new ThreadLocal<>();

    public static void saveUser(UserSenstive user){
        tl.set(user);
    }

    public static UserSenstive getUser(){
        return tl.get();
    }

    public static void removeUser(){
        tl.remove();
    }
}
